
<?php if($pager->haveToPaginate()):?>
  <?php echo link_to('&laquo',$route.'?page=1')?>
  <?php echo link_to('&lt;', $route.'?page='.$pager->getPreviousPage())?>
  <?php foreach ($pager->getLinks() as $page): ?>
    <?php echo link_to_unless($page == $pager->getPage(), $page, $route.'?page='.$page) ?>
   <?php echo ($page != $pager->getCurrentMaxLink()) ? ',' : '' ?>
  <?php endforeach;?>
  <?php echo link_to('&gt;',$route.'?page='.$pager->getNextPage())?>
  <?php echo link_to('&raquo',$route.'?page='.$pager->getLastPage())?>
<?php endif;?>